package com.xiaoxing.salesclient.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.xiaoxing.salesclient.mvp.contract.ZuiXinXiaoXiXiangQingContract;
import com.xiaoxing.salesclient.mvp.model.ZuiXinXiaoXiXiangQingModel;


@Module
public class ZuiXinXiaoXiXiangQingModule {
    private ZuiXinXiaoXiXiangQingContract.View view;

    /**
     * 构建ZuiXinXiaoXiXiangQingModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ZuiXinXiaoXiXiangQingModule(ZuiXinXiaoXiXiangQingContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ZuiXinXiaoXiXiangQingContract.View provideZuiXinXiaoXiXiangQingView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ZuiXinXiaoXiXiangQingContract.Model provideZuiXinXiaoXiXiangQingModel(ZuiXinXiaoXiXiangQingModel model) {
        return model;
    }
}